# apps/imports/urls.py
from django.urls import path, include
from rest_framework.routers import DefaultRouter
from . import views

# 创建路由器
router = DefaultRouter()

# 注册视图集，basename 用于生成 URL 名称
router.register(r'import-logs', views.ImportLogViewSet, basename='import-log')

# 应用级 URL 模式
urlpatterns = [
    # 包含由路由器自动生成的所有路由
    # 例如：
    # - GET /imports/import-logs/          -> 列表
    # - POST /imports/import-logs/         -> 创建
    # - GET /imports/import-logs/{id}/     -> 详情
    # - POST /imports/import-logs/{id}/mark-processing/ -> 标记处理中
    # - GET /imports/import-logs/stats/    -> 统计
    path('', include(router.urls)),
]